
/**
 * Project Name:cats-core
 * File Name:UserInfo.java
 * Package Name:com.catsic.core.base
 * Date:2014年3月10日上午9:24:21
 * Copyright (c) 2014, oa.catsic.com All Rights Reserved.
 */
 
package com.catsic.base;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

/**
 * ClassName: BaseUser
 * Description: 登录用户信息基础类
 * date: 2014年3月10日 上午9:24:21
 * author: yangyd
 */
public class BaseInfo extends User{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1993802818112049969L;

	/**
	 * userId:用户ID
	 */
	private String userId;
	
	/**
	 * organId:机构ID
	 */
	private String organId;
	
	/**
	 * organCode:机构Code
	 */
	private String organCode;
	
	/**
	 * organName:机构名称
	 */
	private String organName;
	
	/**
	 * departId:部门ID
	 */
	private String departId;
	
	/**
	 * departName:部门名称
	 */
	private String departName;
	
	/**
	 * departCode:部门编码
	 */
	private String departCode;
	
	/**
	 * ip:ip地址
	 */
	private String ip;
	
	/**
	 * pwdIsValid:密码是否有效 ，true 有效，false 无效
	 */
	private boolean pwdIsValid = false;

	public BaseInfo(String username,String password, Collection<? extends GrantedAuthority> authorities){
		super(username,password,authorities);
	}
		
	public BaseInfo(String username, String password, boolean enabled,
			boolean accountNonExpired, boolean credentialsNonExpired,
			boolean accountNonLocked,
			Collection<? extends GrantedAuthority> authorities) {
		
		super(username, password, enabled, accountNonExpired, credentialsNonExpired,
				accountNonLocked, authorities);
		
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getOrganId() {
		return organId;
	}

	public void setOrganId(String organId) {
		this.organId = organId;
	}
	
	public String getOrganCode() {
		return organCode;
	}

	public void setOrganCode(String organCode) {
		this.organCode = organCode;
	}
   
	public String getOrganName() {
		return organName;
	}

	public void setOrganName(String organName) {
		this.organName = organName;
	}

	public String getDepartId() {
		return departId;
	}

	public void setDepartId(String departId) {
		this.departId = departId;
	}

	public String getDepartName() {
		return departName;
	}

	public void setDepartName(String departName) {
		this.departName = departName;
	}

	public String getDepartCode() {
		return departCode;
	}

	public void setDepartCode(String departCode) {
		this.departCode = departCode;
	}

	public boolean isPwdIsValid() {
		return pwdIsValid;
	}

	public void setPwdIsValid(boolean pwdIsValid) {
		this.pwdIsValid = pwdIsValid;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
	
}
